# 同一个方法，不同的行为
class T(object):
    def __init__(self, w, h):
        self.w = w
        self.h = h

    def get_area(self):
        return self.w * self.h / 2


class S(object):
    def __init__(self, size):
        self.size = size

    def get_area(self):
        return self.size ** 2


t = T(4, 5)
s = S(5)

print(t.get_area())
print(s.get_area())
